﻿using UnityEngine;
using UnityEngine.UI;

namespace UnknowWorld.CardGame
{
    /// <summary>
    /// 玩家UI
    /// </summary>
    public class CharacterUI : MonoBehaviour
    {
        /// <summary>
        /// 生命值
        /// </summary>
        public Text healthText;
        /// <summary>
        /// 魔法值
        /// </summary>
        public Text magicText;
        /// <summary>
        /// 耐力值
        /// </summary>
        public Text staminaText;
        /// <summary>
        /// 卡牌数
        /// </summary>
        public Text cardCountText;

        /// <summary>
        /// 设置生命
        /// </summary>
        /// <param name="health"></param>
        public void SetHealth(int health)
        {
            healthText.text = string.Format("Ⓗ{0}", health);
        }
        /// <summary>
        /// 设置魔力值
        /// </summary>
        /// <param name="magic"></param>
        public void SetMagic(int magic)
        {
            magicText.text = string.Format("Ⓜ{0}", magic);
        }
        /// <summary>
        /// 设置耐力值
        /// </summary>
        /// <param name="stamina"></param>
        public void SetStamina(int stamina)
        {
            staminaText.text = string.Format("Ⓢ{0}", stamina);
        }
        /// <summary>
        /// 设置卡牌数
        /// </summary>
        /// <param name="cardCount"></param>
        public void SetCardCount(int cardCount)
        {
            cardCountText.text = string.Format("Ⓒ{0}", cardCount);
        }
    }
}